package models;
import java.util.*;
import javax.persistence.*;

import play.data.validation.Required;
import play.db.jpa.*;
 
@Entity
public class Voile extends Model 
{
	public float surface;
	
	@Required
	@ManyToOne
	public Bateau bateau;

	public Voile(float surface, Bateau bateau) 
	{
		this.surface = surface;
		this.bateau = bateau;
	}	
	
	public String toString()
	{
		return this.bateau.nom + "[voile " + Long.toString(this.id) + "]";
	}
}
